<!--专家评审-->
<template>
  <div class="wrapper-container">
    <div class="search-container">
        <div class="search-container-item right20">
            <div class="item-name">课题活动名称：</div>
            <el-select size="mini" style="width: 122px;" v-model="dataForm.subActivityId">
              <el-option v-for="i in type1" :key="i.subActivityId" :label="i.subActivityName" :value="i.subActivityId"></el-option>
            </el-select>
        </div>
        <div class="search-button color-primary width70" @click="initList">
            <img src="../../../../assets/assessment/icon-search.png" alt="" />
            <span>查询</span>
        </div>
    </div>
    <div class="table-container table-css">
        <el-table :data="tableData" border style="width: 100%" class="table-data" :header-cell-style="{background:'#edf2f9','border-color': '#c7d7eb'}"  @selection-change="handleSelectionChange">
            <el-table-column prop="activityName" label="课题活动名称" align="center"></el-table-column>
            <el-table-column prop="info" label="所属阶段/流程" align="center">
              <template slot-scope="scope">
                {{scope.row.currentStageName+' / ' +scope.row.currentFlowName}}
              </template>  
            </el-table-column>
            <el-table-column label="评审情况" align="center" min-width="100">
                <div slot-scope="scope">
                    <span class="small-btn color1" @click="btnPS(scope.row)">评审</span>
                </div>
            </el-table-column>
        </el-table>
        <h1 class="total-notice">当前共找到{{total}}条记录，当前显示{{(this.dataForm.current-1)*50 == 0?1:(this.dataForm.current-1)*50}}-{{total>50?this.dataForm.current*50:total}}条</h1>
        <div class="pagination-block">
            <el-pagination v-if="total>50" prev-text="上一页" next-text="下一页" @current-change="currentPage"
            :page-size="50" layout="prev, pager, next, jumper" :total="total"></el-pagination>
        </div>
    </div>
  </div>
</template>

<script>
import {pshdList} from "@/api/teachingTopic";
export default {
  data() {
    return {
        total:1,
        dataForm:{
          current:1,
          size:50,
          subActivityId:''
        },
        type1:[],
        addForm:{vale:''},
        tableData: [],
    };
  },
  mounted(){
    this.initList();
    this.commonApi.getAllActivity().then(res=>{
      this.type1 = res.data
    })
},
  methods: {
    //初始化表格
    async initList(){
      let res = await pshdList(this.dataForm);
      if(res.code == 200){
        this.tableData = res.data.records;
        this.total = res.data.total;
      }
    },
    btnPS(row){
      this.$router.push({
        path:'/teachingTopics/review/expert/ps',
        query:{
          activityId:row.activityId,
          currentFlow:row.currentFlow,
          currentStage:row.currentStage
        }
      })
    },
    currentPage(e){
      this.dataForm.current = e;
      this.initList()
    },
  },
};
</script>
<style lang="less" scoped>
.table-css {
  margin-top: 30px;
 /deep/ .el-table td,
  .el-table th.is-leaf,
  .el-table--border,
  .el-table--group {
    border-color: #c7d7eb;
  }

  /deep/.el-table__header tr,
  .el-table__header th {
    padding: 0;
    height: 76px;
    background-color: #edf2f9;
    font-size: 16px;
    font-family: Microsoft YaHei;
    font-weight: bold;
    line-height: 20px;
    color: #004ca7;
  }

  /deep/.el-table__body tr,
  .el-table__body td {
    padding: 0;
    height: 86px;
  }
 /deep/ .el-table__footer-wrapper td {
    padding: 0;
    height: 86px;
  }
  /deep/.el-table thead.is-group th.el-table__cell{
    border-color: #c7d7eb;
  }
 /deep/ .el-table--border th, .el-table__fixed-right-patch{
    border-color: #c7d7eb;
  }
}
</style>
<style lang="less" scoped>
@import "../../../../styles/commonCss.less";
.search-container {
  justify-content: space-between !important;
}
.total-notice{margin-bottom: 10px;}
.color1{
  background: #F4F9FF;
  border: 1px solid #054CA7;
  display: block;
  width: 100px;
}
</style>
